//
//  CusTableViewCell.m
//  13-Homework
//
//  Created by dllo on 16/8/1.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "CusTableViewCell.h"
#import "FoundPageModel.h"
@interface CusTableViewCell ()
@property (weak, nonatomic) IBOutlet UIButton *headButton;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *labelTitle;
@property (weak, nonatomic) IBOutlet UIButton *topicButton;
@property (weak, nonatomic) IBOutlet UILabel *readLabel;
@property (weak, nonatomic) IBOutlet UILabel *commitLabel;
@property (weak, nonatomic) IBOutlet UILabel *likeLabel;
@property (weak, nonatomic) IBOutlet UILabel *rewardLabel;
@property (weak, nonatomic) IBOutlet UIImageView *coverImageView;
@end

@implementation CusTableViewCell

- (void)setFoundPageModel:(FoundPageModel *)foundPageModel {
    _foundPageModel = foundPageModel;
//    [_headButton setImage:[UIImage imageNamed:foundPageModel.headImageStr] forState:UIControlStateNormal];
    [_headButton setTitle:foundPageModel.headText forState:UIControlStateNormal];
    _timeLabel.text = foundPageModel.time;
    _labelTitle.text = foundPageModel.title;
    [_topicButton setTitle:foundPageModel.topic forState:UIControlStateNormal];
    _readLabel.text = foundPageModel.readCount;
    _commitLabel.text = foundPageModel.commitCount;
    _likeLabel.text = foundPageModel.likeCount;
    _rewardLabel.text = foundPageModel.rewardCount;
    _coverImageView.image = [UIImage imageNamed:foundPageModel.coverImageStr];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
